import {NgModule} from '@angular/core';
import {CommonModule} from '@angular/common';
import {RouterModule, Routes} from '@angular/router';
import {HerolistComponent} from './herolist/herolist.component';
import {AppHerodetailComponent} from './app-herodetail/app-herodetail.component';
const heroesRoutes: Routes = [
  {path: 'heroes', component: HerolistComponent},
  {path: 'hero/:id', component: AppHerodetailComponent}
];

@NgModule({
  imports: [
    RouterModule.forChild(heroesRoutes)
  ],
  exports: [RouterModule]
})
export class HerosRoutingModule {
}
